package com.isyscore.controller.admin;


import com.isyscore.model.sys.menu.query.MenuQueryReq;
import com.isyscore.service.admin.SysMenuService;
import com.isyscore.utils.MesResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 菜单权限表 前端控制器
 * </p>
 *
 * @author LGL
 * @since 2024年10月25日
 */
@RestController
@RequestMapping("api/sysMenu")
@Tag(name = "菜单管理" ,description = "菜单管理相关接口")
public class SysMenuController {
    @Autowired
    private SysMenuService menuService;

    @Operation(summary = "获取菜单树列表")
    @PostMapping("/list")
    @RequiresPermissions("system:menu:list")
    public MesResult list(@RequestBody MenuQueryReq queryReq) {
        return MesResult.success(menuService.getMenuDtos(queryReq));
    }


}

